import java.util.Scanner;

public class Test {
    //4.编写程序数一下 1到 100 的所有整数中出现多少个数字9
    public static void main(String[] args) {
        for (int num = 1;num <= 100;num++){
            if(num % 10 == 9 || num / 10 == 9){
                System.out.println(num);
            }
        }
    }
    //3.输出 1000 - 2000 之间所有的闰年
    public static void main3(String[] args) {
        for(int m = 1000;m <= 2000;m++){
            if (m % 4 ==0 && m %100 != 0||m % 400 ==0) {
                System.out.println(m);
            }
        }
    }
    //2.打印 1 - 100 之间所有的素数                     ?
    public static void main2(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int x = scanner.nextInt();
        int k = 0;
        while (k < x) {
            int i = 2;
            while (i <= Math.sqrt(k)) {
                if(k % i == 0) {
                    //break;
                    System.out.println(k+" 不是素数！");
                    return;
                }
                i++;
            }
            //
            System.out.println(k+" 是素数！");
            k++;
        }

    }
    //1.给定一个数字，判定一个数字是否是素数(1)
    public static void main1(String[] args) {
        Scanner sca = new Scanner(System.in);
        int num = sca.nextInt();
         int i = 1;
         if (num == 1) {
             System.out.println(num + "不是素数");
         }else {
             for (i = 2; i < num; i++)
                 if (num % i == 0) {
                     System.out.println(num + "不是素数");
                     break;
                 }
         }
         if (i == num){
             System.out.println(num+"是素数");
         }
    }
}
/*(2)public static void main(String[] args) {
    Scanner scanner = new Scanner(System.in);
    int n = scanner.nextInt();
    int i;
    for (i = 2;i <= n/2;i++) {
        if(n%i == 0) {
            //System.out.println("n不是素数："+n);
            break;
        }
    }
    if(i > n/2) {
        System.out.println(n + "是素数");
    }
}*/
/*(3)public static void main(String[] args) {
    Scanner scanner = new Scanner(System.in);
    int n = scanner.nextInt();
    int i;
    for (i = 2;i <= Math.sqrt(n);i++) {
        if(n%i == 0) {
            //System.out.println("n不是素数："+n);
            break;
        }
    }
    if(i > Math.sqrt(n)) {
        System.out.println(n + "是素数");
    }
}
*/